'NWSERVER.BAS NetWare File Server Environment Services Interface for Visual Basic For Windows
'Version 1.0
'Novell Systems Research Department, Novell, Inc.
'Copyright (c) 1993, Novell, Inc.
'This interface is not supported through Novell's regular
'support channels. See README.TXT for more information.
Type CON_OPEN_FILES
taskNumber As String * 1
lockStatus As String * 1
accessFlag As String * 1
lockType As String * 1
volumeNumber As String * 1
reserved As String * 1
directoryEntry As Integer
fileName As String * 15
End Type
Type CONN_SEMAPHORE
openCount As Long
semaphoreValue As String * 1
taskNumber As String * 1
semaphoreName As String * 128
End Type
Type CONN_TASK_INFO
lockStatus As String * 1
waitingTaskNumber As String * 1
beginAddress As Long
endAddress As Long
volumeNumber As String * 1
numberOfTasks As String * 1
directoryEntry As Integer
lockedName As String * 50
taskNumber As String * 1
taskState As String * 1
End Type
Type CONN_USAGE
systemElapsedTime As Long
bytesRead As String * 6
bytesWritten As String * 6
totalRequestPackets As Long
End Type
Type CONN_USING_FILE
useCount As Integer
openCount As Integer
openForReadCount As Long
openForWriteCount As Long
denyReadCount As Long
denyWriteCount As Long
reserved1 As Integer
locked As String * 1
reserved2 As String * 1
logicalConnNumber As Long
taskNumber As String * 1
lockType As String * 1
accessFlags As String * 1
lockStatus As String * 1
End Type
Type DISK_CACHE_STATS
systemElapsedTime As Long
cacheBufferCount As Integer
cacheBufferSize As Integer
dirtyCacheBuffers As Integer
cacheReadRequests As Long
cacheWriteRequests As Long
cacheHits As Long
cacheMisses As Long
physicalReadRequests As Long
physicalWriteRequests As Long
physicalReadErrors As Integer
physicalWriteErrors As Integer
cacheGetRequests As Long
cacheFullWriteRequests As Long
cachePartialWriteRequests As Long
backgroundDirtyWrites As Long
backgroundAgedWrites As Long
totalCacheWrites As Long
cacheAllocations As Long
thrashingCount As Integer
LRUBlockWasDirtyCount As Integer
readBeyondWriteCount As Integer
fragmentedWriteCount As Integer
cacheHitOnUnavailCount As Integer
cacheBlockScrappedCount As Integer
End Type
Type DISK_CHANNEL_STATS
systemElapsedTime As Long
channelState As Integer
channelSyncState As Integer
driverType As String * 1
driverMajorVersion As String * 1
driverMinorVersion As String * 1
driverDescription As String * 65
IOAddr1 As Integer
IOAddr1Size As Integer
IOAddr2 As Integer
IOAddr2Size As Integer
sharedMem1Seg As String * 3
sharedMem1Off As Integer
sharedMem2Seg As String * 3
sharedMem2Off As Integer
interrupt1Used As String * 1
interrupt1 As String * 1
interrupt2Used As String * 1
interrupt2 As String * 1
DMAChannel1Used As String * 1
DMAChannel1 As String * 1
DMAChannel2Used As String * 1
DMAChannel2 As String * 1
reserved2 As Integer
configDescription As String * 80
End Type
Type DRIVE_MAP_TABLE
systemElapsedTime As Long
SFTLevel As String * 1
logicalDriveCount As String * 1
physicalDriveCount As String * 1
diskChannelTable As String * 5
pendingIOCommands As Integer
mappingTable As String * 32
driveMirrorTable As String * 32
deadMirrorTable As String * 32
remirroredDrive As String * 1
reserved As String * 1
remirroredBlock As Long
SFTErrorTable As String * 120
End Type
Type SERVER_LAN_IO
systemElapsedTime As Long
maxRoutingBuffersAvail As Integer
maxRoutingBuffersUsed As Integer
routingBuffersInUse As Integer
totalFileServicePackets As Long
fileServicePacketsBuffered As Integer
invalidConnPacketCount As Long
badLogicalConnCount As Long
packetsRcvdDuringProcCount As Integer
reprocessedRequestCount As Integer
badSequenceNumberPacketCount As Integer
duplicateReplyCount As Integer
acknowledgementsSent As Integer
badRequestTypeCount As Integer
attachDuringProcCount As Integer
attachWhileAttachingCount As Integer
forgedDetachRequestCount As Integer
badConnNumberOnDetachCount As Long
detachDuringProcCount As Integer
repliesCanceledCount As Integer
hopCountDiscardCount As Integer
unknownNetDiscardCount As Integer
noDGroupBufferDiscardCount As Integer
outPacketNoBufferDiscardCount As Integer
IPXNotMyNetworkCount As Integer
NetBIOSPropagationCount As Long
totalOtherPackets As Long
totalRoutedPackets As Long
End Type
Type SERVER_MISC_INFO
systemElapsedTime As Long
processorType As String * 1
reserved As String * 1
serviceProcessCount As String * 1
serverUtilizationPercent As String * 1
maxBinderyObjectsAvail As Integer
maxBinderyObjectsUsed As Integer
binderyObjectsInUse As Integer
serverMemoryInK As Integer
dynamicAreaCount As Integer
dynamicSpace1 As Long
maxUsedDynamicSpace1 As Long
dynamicSpaceInUse1 As Long
dynamicSpace2 As Long
maxUsedDynamicSpace2 As Long
dynamicSpaceInUse2 As Long
dynamicSpace3 As Long
maxUsedDynamicSpace3 As Long
dynamicSpaceInUse3 As Long
End Type
Type FILE_SYS_STATS
systemElapsedTime As Long
maxOpenFiles As Integer
maxFilesOpen As Integer
currOpenFiles As Integer
totalFilesOpened As Long
totalReadRequests As Long
totalWriteRequests As Long
currChangedFATSectors As Integer
totalChangedFATSectors As Long
FATWriteErrors As Integer
fatalFATWriteErrors As Integer
FATScanErrors As Integer
maxIndexFilesOpened As Integer
currOpenIndexedFiles As Integer
attachedIndexFiles As Integer
availableindexFiles As Integer
End Type
Type LAN_CONFIG
networkAddress As Long
hostAddress1 As Long
hostAddress2 As Integer
LANDriverInstalled As String * 1
optionNumber As String * 1
configurationText1 As String * 80
configuratinoText2 As String * 80
End Type
Type LOGICAL_REC_INFO
currentUseCount As Integer
shareableLockCount As Integer
reserved1 As Integer
locked As String * 1
reserved2 As String * 1
logicalConnectionNumber As Long
taskNumber As String * 1
lockStatus As String * 1
End Type
Type LOGICAL_RECORD
taskNumber As String * 1
lockStatus As String * 1
logicalLockName As String * 102
End Type
Type PHYS_DISK_STATS
systemElapsedTime As Long
diskChannel As String * 1
diskRemovable As String * 1
driveType As String * 1
controllerDriverNumber As String * 1
controllerNumber As String * 1
controllerType As String * 1
driveSize As Long
driveCylinders As Integer
driveHeads As String * 1
sectorsPerTrack As String * 1
IOErrorCount As Integer
hotFixStart As Long
hotFixSize As Integer
hotFixSizeAvailable As Integer
hotFixDisabled As String * 1
End Type
Type PHYS_REC_LOCK
physicalRecordLockCount As String * 1
reserved As String * 1
loggedCount As Integer
shareLockCount As Integer
recordStart As Long
recordEnd As Long
connectionNumber As Long
taskNumber As String * 1
lockType As String * 1
End Type
Type SHORT_PHYS_REC_LOCK
taskNumber As String * 1
lockFlag As String * 1
recordStart As Long
recordEnd As Long
End Type
Type FILE_SERV_INFO
serverName As String * 48
netwareVersion As String * 1
netwareSubVersion As String * 1
maxConnectionsSupported As Long
connectionsInUse As Long
maxVolumesSupported As Integer
revisionLevel As String * 1
SFTLevel As String * 1
TTSLevel As String * 1
peakConnectionsUsed As Long
accountingVersion As String * 1
VAPversion As String * 1
queueingVersion As String * 1
printServerVersion As String * 1
virtualConsoleVersion As String * 1
securityRestrictionLevel As String * 1
internetBridgeSupport As String * 1
End Type
Declare Function CheckConsolePrivileges Lib "NWNETAPI.DLL" () As Integer
Declare Function CheckNetWareVersion Lib "NWNETAPI.DLL" (ByVal minVersion%, ByVal minSubVersion%, ByVal minRevision%, ByVal minSFT%, ByVal minTTS%) As Integer
Declare Function ClearConnectionNumber Lib "NWNETAPI.DLL" (ByVal connNumber&) As Integer 'documentation says 2.x only, but it works in 3.x
Declare Function DisableFileServerLogin Lib "NWNETAPI.DLL" () As Integer
Declare Function DisableTransactionTracking Lib "NWNETAPI.DLL" () As Integer
Declare Function DownFileServer Lib "NWNETAPI.DLL" (ByVal forceFlag%) As Integer
Declare Function EnableFileServerLogin Lib "NWNETAPI.DLL" () As Integer
Declare Function EnableTransactionTracking Lib "NWNETAPI.DLL" () As Integer
Declare Function GetConnectionsOpenFiles Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, lastRecord%, lastTask%, ByVal structSize%, openFiles As CON_OPEN_FILES) As Integer '2.x only
Declare Function GetConnectionsSemaphores Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, lastRecord%, lastTask%, ByVal structSize%, connSemaphores As CONN_SEMAPHORE) As Integer '2.x only
Declare Function GetConnectionsTaskInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, taskPointer%, ByVal structSize%, connTaskInfo As CONN_TASK_INFO) As Integer '2.x only
Declare Function GetConnectionsUsageStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, ByVal structSize%, connUsage As CONN_USAGE) As Integer '2.x only
Declare Function GetConnectionsUsingFile Lib "NWNETAPI.DLL" (ByVal connID%, lastRecord%, taskID%, ByVal dirHandle%, ByVal filePath$, ByVal structSize%, fileUse As CONN_USING_FILE) As Integer '2.x only
Declare Function GetDiskCacheStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, cacheStats As DISK_CACHE_STATS) As Integer '2.x only
Declare Function GetDiskChannelStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal channelNumber%, ByVal structSize%, channelStats As DISK_CHANNEL_STATS) As Integer '2.x only
Declare Function GetDiskUtilization Lib "NWNETAPI.DLL" (ByVal objectID&, ByVal volNumber%, usedDirectories%, usedFiles%, usedBlocks%) As Integer
Declare Function GetDriveMappingTable Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, driveMappingTable As DRIVE_MAP_TABLE) As Integer '2.x only
Declare Sub GetFileServerDateAndTime Lib "NWNETAPI.DLL" (dateAndTime As DATE_AND_TIME)
'companyName, revision, and copyrightNotice must be initialized to 80 bytes
'revisionDate must be initialized to 24 bytes
Declare Function GetFileServerDescriptionStrings Lib "NWNETAPI.DLL" (ByVal companyName$, ByVal revision$, ByVal revisionDate$, ByVal copyrightNotice$) As Integer
Declare Function GetFileServerLANIOStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, serverLANIOStats As SERVER_LAN_IO) As Integer '2.x only
Declare Function GetFileServerLoginStatus Lib "NWNETAPI.DLL" (loginEnabledFlag%) As Integer
Declare Function GetFileServerMiscInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, miscInfo As SERVER_MISC_INFO) As Integer '2.x only
Declare Sub GetFileServerName Lib "NWNETAPI.DLL" (ByVal connID%, ByVal fileServerName$)
Declare Function GetFileSystemStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, fileSysStats As FILE_SYS_STATS) As Integer '2.x only
Declare Function GetLANDriverConfigInfo Lib "NWNETAPI.DLL" (ByVal connID%, ByVal LANBoardNumber%, ByVal structSize%, LANConfig As LAN_CONFIG) As Integer '2.x only
Declare Function GetLogicalRecordInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal logicalRecordName$, lastRecord%, lastTask%, ByVal structSize%, logicalRecordInfo As LOGICAL_REC_INFO) As Integer '2.x only
Declare Function GetLogicalRecordByConnection Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, lastRecord%, lastTask%, ByVal structSize%, logicalRecord As LOGICAL_RECORD) As Integer '2.x only
'path$ must be initialized to 255 bytes
Declare Function GetPathFromDirectoryEntry Lib "NWNETAPI.DLL" (ByVal connID%, ByVal volumeNumber%, ByVal directoryEntry%, ByVal path$) As Integer '2.x only
'driveDefinition$ must be initialized to ?? bytes
Declare Function GetPhysicalDiskStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal physDiskNumber%, ByVal structSize%, physDiskStats As PHYS_DISK_STATS, ByVal driveDefinition$) As Integer '2.x only
Declare Function GetPhysicalRecordLocksByFile Lib "NWNETAPI.DLL" (ByVal connID%, ByVal dirHandle%, ByVal filePath$, lastRecord%, lastTask%, ByVal structSize%, recordLock As PHYS_REC_LOCK) As Integer '2.x only
Declare Function GetPhysRecLockByConnectAndFile Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, ByVal volNum%, ByVal dirHandle%, ByVal filePath$, lastRecord%, lastTask%, ByVal structSize%, recLock As SHORT_PHYS_REC_LOCK) As Integer '2.x only
Declare Function GetSemaphoreInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal semaphoreName$, lastRecord%, lastTask%, openCount&, semaphoreValue%, connNum&, taskNumber%) As Integer '2.x only
Declare Function GetServerInformation Lib "NWNETAPI.DLL" (ByVal structSize%, serverInfo As FILE_SERV_INFO) As Integer 'documentation says 2.x only, but it works in 3.x
Declare Function SendConsoleBroadcast Lib "NWNETAPI.DLL" (ByVal message$, ByVal connCount%, connList&) As Integer
Declare Function SetFileServerDateAndTime Lib "NWNETAPI.DLL" (ByVal theYear%, ByVal theMonth%, ByVal theDay%, ByVal theHour%, ByVal theMin%, ByVal theSec%) As Integer